{{ template "head" .Global }}

<div class="container">
    <div class="section">
        <!--DataTables example-->
        <div id="table-datatables">
            <div class="row">
                    <table id="data-table-simple" class="responsive-table display" cellspacing="0">
                        <thead>
                        <tr>
                            <th>项目ID</th>
                            <th>项目名称</th>
                            <th>环境</th>
                            <th>编辑配置</th>
                        </tr>
                        </thead>

                        <tfoot>
                        <tr>
                            <th>项目ID</th>
                            <th>项目名称</th>
                            <th>环境</th>
                            <th>编辑配置</th>
                        </tr>
                        </tfoot>

                        <tbody>
                        {{range .Project}}
                        <tr>
                            <td>{{.id}}</td>
                            <td>{{.name}}</td>
                            <td>{{.env}}</td>
                            <td>
                                <form method="post" action="/config/list">
                                    <input type="hidden" name="id" value="{{.id}}">
                                    <input type="hidden" name="name" value="{{.name}}">
                                    <input type="hidden" name="env" value="{{.env}}">
                                    <button class="btn blue waves-effect" type="submit">编辑配置</button>
                                </form>
                            </td>
                        </tr>
                        {{end}}
                        </tbody>
                    </table>
            </div>
        </div>
    </div>
    <!-- Floating Action Button -->
    <div class="fixed-action-btn" style="bottom: 50px; right: 19px;">
        <a class="btn-floating btn-large">
            <i class="mdi-action-stars"></i>
        </a>
        <ul>
            <li><a href="css-helpers.html" class="btn-floating red"><i class="large mdi-communication-live-help"></i></a></li>
            <li><a href="app-widget.html" class="btn-floating yellow darken-1"><i class="large mdi-device-now-widgets"></i></a></li>
            <li><a href="app-calendar.html" class="btn-floating green"><i class="large mdi-editor-insert-invitation"></i></a></li>
            <li><a href="app-email.html" class="btn-floating blue"><i class="large mdi-communication-email"></i></a></li>
        </ul>
    </div>
    <!-- Floating Action Button -->
</div>

</section>

{{ template "foot" }}

<!-- ================================================
    Scripts
    ================================================ -->

<!-- jQuery Library -->
<script type="text/javascript" src="/statics/js/plugins/jquery-1.11.2.min.js"></script>
<!--materialize js-->
<script type="text/javascript" src="/statics/js/materialize.min.js"></script>
<!--prism-->
<script type="text/javascript" src="/statics/js/plugins/prism/prism.js"></script>
<!--scrollbar-->
<script type="text/javascript" src="/statics/js/plugins/perfect-scrollbar/perfect-scrollbar.min.js"></script>
<!-- data-tables -->
<script type="text/javascript" src="/statics/js/plugins/data-tables/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/statics/js/plugins/data-tables/data-tables-script.js"></script>
<!-- chartist -->
<script type="text/javascript" src="/statics/js/plugins/chartist-js/chartist.min.js"></script>
<!--plugins.js - Some Specific JS codes for Plugin Settings-->
<script type="text/javascript" src="/statics/js/plugins.min.js"></script>
<!--custom-script.js - Add your own theme custom JS-->
<script type="text/javascript" src="/statics/js/custom-script.js"></script>


<script type="text/javascript">
    /*Show entries on click hide*/
    $(document).ready(function(){
        $(".dropdown-content.select-dropdown li").on( "click", function() {
            var that = this;
            setTimeout(function(){
                if($(that).parent().hasClass('active')){
                    $(that).parent().removeClass('active');
                    $(that).parent().hide();
                }
            },100);
        });
    });
</script>

</body>

</html>